{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 写出导入pandas的语句，并且给pandas别名为`pd`。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 创建一个名为`students`的DataFrame，包含数据如下：\n",
    "```{\"001\": {\"姓名\": \"小陈\", \"考试1\": 85, \"考试2\": 95, \"考试3\": 92},\n",
    " \"002\": {\"姓名\": \"小李\", \"考试1\": 91, \"考试2\": 92, \"考试3\": 94},\n",
    " \"003\": {\"姓名\": \"小王\", \"考试1\": 86, \"考试2\": 81, \"考试3\": 89},\n",
    " \"004\": {\"姓名\": \"小张\", \"考试1\": 79, \"考试2\": 89, \"考试3\": 95},\n",
    " \"005\": {\"姓名\": \"小赵\", \"考试1\": 96, \"考试2\": 91, \"考试3\": 91},\n",
    " \"006\": {\"姓名\": \"小周\", \"考试1\": 81, \"考试2\": 89, \"考试3\": 92}\n",
    " }```\n",
    " \n",
    " #### 要求索引为学号（001、002等），列名为姓名、考试1、考试2、考试3，并输出创建好的DataFrame。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>姓名</th>\n",
       "      <th>考试1</th>\n",
       "      <th>考试2</th>\n",
       "      <th>考试3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>001</th>\n",
       "      <td>小陈</td>\n",
       "      <td>85</td>\n",
       "      <td>95</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>002</th>\n",
       "      <td>小李</td>\n",
       "      <td>91</td>\n",
       "      <td>92</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>003</th>\n",
       "      <td>小王</td>\n",
       "      <td>86</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>004</th>\n",
       "      <td>小张</td>\n",
       "      <td>79</td>\n",
       "      <td>89</td>\n",
       "      <td>95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>005</th>\n",
       "      <td>小赵</td>\n",
       "      <td>96</td>\n",
       "      <td>91</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>006</th>\n",
       "      <td>小周</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     姓名 考试1 考试2 考试3\n",
       "001  小陈  85  95  92\n",
       "002  小李  91  92  94\n",
       "003  小王  86  81  89\n",
       "004  小张  79  89  95\n",
       "005  小赵  96  91  91\n",
       "006  小周  81  89  92"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "student_data = {\"001\": {\"姓名\": \"小陈\", \"考试1\": 85, \"考试2\": 95, \"考试3\": 92},\n",
    " \"002\": {\"姓名\": \"小李\", \"考试1\": 91, \"考试2\": 92, \"考试3\": 94},\n",
    " \"003\": {\"姓名\": \"小王\", \"考试1\": 86, \"考试2\": 81, \"考试3\": 89},\n",
    " \"004\": {\"姓名\": \"小张\", \"考试1\": 79, \"考试2\": 89, \"考试3\": 95},\n",
    " \"005\": {\"姓名\": \"小赵\", \"考试1\": 96, \"考试2\": 91, \"考试3\": 91},\n",
    " \"006\": {\"姓名\": \"小周\", \"考试1\": 81, \"考试2\": 89, \"考试3\": 92}}\n",
    "students = pd.DataFrame(student_data).T\n",
    "students"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 给`students`增加一列`考试4`，数据依次为：`[72, 69, 79, 83, 82, 76]`。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>姓名</th>\n",
       "      <th>考试1</th>\n",
       "      <th>考试2</th>\n",
       "      <th>考试3</th>\n",
       "      <th>考试4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>001</th>\n",
       "      <td>小陈</td>\n",
       "      <td>85</td>\n",
       "      <td>95</td>\n",
       "      <td>92</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>002</th>\n",
       "      <td>小李</td>\n",
       "      <td>91</td>\n",
       "      <td>92</td>\n",
       "      <td>94</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>003</th>\n",
       "      <td>小王</td>\n",
       "      <td>86</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>004</th>\n",
       "      <td>小张</td>\n",
       "      <td>79</td>\n",
       "      <td>89</td>\n",
       "      <td>95</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>005</th>\n",
       "      <td>小赵</td>\n",
       "      <td>96</td>\n",
       "      <td>91</td>\n",
       "      <td>91</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>006</th>\n",
       "      <td>小周</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "      <td>92</td>\n",
       "      <td>76</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     姓名 考试1 考试2 考试3  考试4\n",
       "001  小陈  85  95  92   72\n",
       "002  小李  91  92  94   69\n",
       "003  小王  86  81  89   79\n",
       "004  小张  79  89  95   83\n",
       "005  小赵  96  91  91   82\n",
       "006  小周  81  89  92   76"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "students[\"考试4\"] = [72, 69, 79, 83, 82, 76]\n",
    "students"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 给`students`添加一行，索引为007，数据为：`\"小杨\", 79, 82, 81, 69`。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>姓名</th>\n",
       "      <th>考试1</th>\n",
       "      <th>考试2</th>\n",
       "      <th>考试3</th>\n",
       "      <th>考试4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>001</th>\n",
       "      <td>小陈</td>\n",
       "      <td>85</td>\n",
       "      <td>95</td>\n",
       "      <td>92</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>002</th>\n",
       "      <td>小李</td>\n",
       "      <td>91</td>\n",
       "      <td>92</td>\n",
       "      <td>94</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>003</th>\n",
       "      <td>小王</td>\n",
       "      <td>86</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>004</th>\n",
       "      <td>小张</td>\n",
       "      <td>79</td>\n",
       "      <td>89</td>\n",
       "      <td>95</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>005</th>\n",
       "      <td>小赵</td>\n",
       "      <td>96</td>\n",
       "      <td>91</td>\n",
       "      <td>91</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>006</th>\n",
       "      <td>小周</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "      <td>92</td>\n",
       "      <td>76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>007</th>\n",
       "      <td>小杨</td>\n",
       "      <td>79</td>\n",
       "      <td>82</td>\n",
       "      <td>81</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     姓名 考试1 考试2 考试3  考试4\n",
       "001  小陈  85  95  92   72\n",
       "002  小李  91  92  94   69\n",
       "003  小王  86  81  89   79\n",
       "004  小张  79  89  95   83\n",
       "005  小赵  96  91  91   82\n",
       "006  小周  81  89  92   76\n",
       "007  小杨  79  82  81   69"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "students.loc[\"007\"] = [\"小杨\", 79, 82, 81, 69]\n",
    "students"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 输出`students`删除索引为006、007的结果，但不要改变`students`本身。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>姓名</th>\n",
       "      <th>考试1</th>\n",
       "      <th>考试2</th>\n",
       "      <th>考试3</th>\n",
       "      <th>考试4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>001</th>\n",
       "      <td>小陈</td>\n",
       "      <td>85</td>\n",
       "      <td>95</td>\n",
       "      <td>92</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>002</th>\n",
       "      <td>小李</td>\n",
       "      <td>91</td>\n",
       "      <td>92</td>\n",
       "      <td>94</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>003</th>\n",
       "      <td>小王</td>\n",
       "      <td>86</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>004</th>\n",
       "      <td>小张</td>\n",
       "      <td>79</td>\n",
       "      <td>89</td>\n",
       "      <td>95</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>005</th>\n",
       "      <td>小赵</td>\n",
       "      <td>96</td>\n",
       "      <td>91</td>\n",
       "      <td>91</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     姓名 考试1 考试2 考试3  考试4\n",
       "001  小陈  85  95  92   72\n",
       "002  小李  91  92  94   69\n",
       "003  小王  86  81  89   79\n",
       "004  小张  79  89  95   83\n",
       "005  小赵  96  91  91   82"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "students.drop([\"006\", \"007\"], axis=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 输出`students`删除列名为“考试2”、“考试4”的结果，但不要改变`students`本身。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>姓名</th>\n",
       "      <th>考试1</th>\n",
       "      <th>考试3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>001</th>\n",
       "      <td>小陈</td>\n",
       "      <td>85</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>002</th>\n",
       "      <td>小李</td>\n",
       "      <td>91</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>003</th>\n",
       "      <td>小王</td>\n",
       "      <td>86</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>004</th>\n",
       "      <td>小张</td>\n",
       "      <td>79</td>\n",
       "      <td>95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>005</th>\n",
       "      <td>小赵</td>\n",
       "      <td>96</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>006</th>\n",
       "      <td>小周</td>\n",
       "      <td>81</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>007</th>\n",
       "      <td>小杨</td>\n",
       "      <td>79</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     姓名 考试1 考试3\n",
       "001  小陈  85  92\n",
       "002  小李  91  94\n",
       "003  小王  86  89\n",
       "004  小张  79  95\n",
       "005  小赵  96  91\n",
       "006  小周  81  92\n",
       "007  小杨  79  81"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "students.drop([\"考试2\", \"考试4\"], axis=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 创建一个Series`bonus`，包含的值和值对应的索引分别为：`{\"考试1\": 2, \"考试2\": 3, \"考试3\": 2, \"考试4\": 5}`。输出这个Series与`students`里所有分数列相加后的结果，但不用更新`students`。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>考试1</th>\n",
       "      <th>考试2</th>\n",
       "      <th>考试3</th>\n",
       "      <th>考试4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>001</th>\n",
       "      <td>87</td>\n",
       "      <td>98</td>\n",
       "      <td>94</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>002</th>\n",
       "      <td>93</td>\n",
       "      <td>95</td>\n",
       "      <td>96</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>003</th>\n",
       "      <td>88</td>\n",
       "      <td>84</td>\n",
       "      <td>91</td>\n",
       "      <td>84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>004</th>\n",
       "      <td>81</td>\n",
       "      <td>92</td>\n",
       "      <td>97</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>005</th>\n",
       "      <td>98</td>\n",
       "      <td>94</td>\n",
       "      <td>93</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>006</th>\n",
       "      <td>83</td>\n",
       "      <td>92</td>\n",
       "      <td>94</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>007</th>\n",
       "      <td>81</td>\n",
       "      <td>85</td>\n",
       "      <td>83</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    考试1 考试2 考试3  考试4\n",
       "001  87  98  94   77\n",
       "002  93  95  96   74\n",
       "003  88  84  91   84\n",
       "004  81  92  97   88\n",
       "005  98  94  93   87\n",
       "006  83  92  94   81\n",
       "007  81  85  83   74"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bonus = pd.Series({\"考试1\": 2, \"考试2\": 3, \"考试3\": 2, \"考试4\": 5})\n",
    "bonus + students[[\"考试1\", \"考试2\", \"考试3\", \"考试4\"]]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 更新`students`的`考试4`，让每项数据值增加10，并输出更新后的结果。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>姓名</th>\n",
       "      <th>考试1</th>\n",
       "      <th>考试2</th>\n",
       "      <th>考试3</th>\n",
       "      <th>考试4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>001</th>\n",
       "      <td>小陈</td>\n",
       "      <td>85</td>\n",
       "      <td>95</td>\n",
       "      <td>92</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>002</th>\n",
       "      <td>小李</td>\n",
       "      <td>91</td>\n",
       "      <td>92</td>\n",
       "      <td>94</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>003</th>\n",
       "      <td>小王</td>\n",
       "      <td>86</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>004</th>\n",
       "      <td>小张</td>\n",
       "      <td>79</td>\n",
       "      <td>89</td>\n",
       "      <td>95</td>\n",
       "      <td>93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>005</th>\n",
       "      <td>小赵</td>\n",
       "      <td>96</td>\n",
       "      <td>91</td>\n",
       "      <td>91</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>006</th>\n",
       "      <td>小周</td>\n",
       "      <td>81</td>\n",
       "      <td>89</td>\n",
       "      <td>92</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>007</th>\n",
       "      <td>小杨</td>\n",
       "      <td>79</td>\n",
       "      <td>82</td>\n",
       "      <td>81</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     姓名 考试1 考试2 考试3  考试4\n",
       "001  小陈  85  95  92   82\n",
       "002  小李  91  92  94   79\n",
       "003  小王  86  81  89   89\n",
       "004  小张  79  89  95   93\n",
       "005  小赵  96  91  91   92\n",
       "006  小周  81  89  92   86\n",
       "007  小杨  79  82  81   79"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "students[\"考试4\"] = students[\"考试4\"] + 10\n",
    "students"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
